#include <string.h>
#include <openssl/err.h>
#include <stdio.h>
#include <unistd.h>
#define BUFFERSIZE 4096

int
main(void){
	int n;
	char buf[BUFFERSIZE];

	while((n = read(STDIN_FILENO, buf, BUFFERSIZE)) > 0){
		if(write(STDOUT_FILENO, buf, n) != n){
			printf("write error : ");
			printf("%s\n", strerror(errno));
			exit(1);
		}
	}

	if(n < 0){
		printf("read error : ");
		printf("%s\n", strerror(errno));
		exit(1);
	}

	exit(0);
}

